package com.tianji.aigc.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "chat_message")
public class MongoChatMessage {

    @Id
    private String id;

    /**
     * 会话ID，关联chat_session的sessionId
     */
    private String sessionId;

    /**
     * 消息内容(JSON格式)
     */
    private String content;

    /**
     * 消息类型：USER(用户)、ASSISTANT(助手)
     */
    private String type;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 创建人
     */
    private Long creater;

    /**
     * 更新人
     */
    private Long updater;
}